feat: document the new --unix-socket flag for HTTP builtins#2059
Merged
hustcer merged 2 commits intonushell:mainfrom Jan 4, 2026
Merged
feat: document the new --unix-socket flag for HTTP builtins#2059hustcer merged 2 commits intonushell:mainfrom
hustcer merged 2 commits intonushell:mainfrom
Conversation
fdncred
pushed a commit
to nushell/nushell
that referenced
this pull request
Oct 23, 2025
All `http` commands now support connecting via Unix domain sockets using
the `--unix-socket` flag, enabling communication with local services
like Docker daemon, systemd, and other IPC services.
# Usage
```nu
# Query Docker daemon via Unix socket
http get --unix-socket /var/run/docker.sock http://localhost/containers/json
# POST to a local service
http post --unix-socket ./my-service.sock http://api/endpoint {data: "value"}
```
The URL's hostname is used for the HTTP `Host` header while the
connection goes through the specified socket path.
# Platform support
Unix systems (Linux, macOS, BSD) and Windows!
# Testing
Manually tested, on POSIX only, with a real-world use case:
[xs.nu](https://gist.github.com/cablehead/b853c7f6bea96fab49a66c0352f10574#file-xs-nu-L24-L61)
- a Nushell wrapper for [cross.stream](https://github.com/cablehead/xs)
that uses the new Unix socket support.
# Notes
The `--unix-socket` flag follows curl's design, where it accepts a path
to connect through the Unix domain socket instead of using TCP.
# Documentation
See nushell/nushell.github.io#2059
Contributor
|
Thanks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
corresponding PR: nushell/nushell#16907